<template>
	<view>
		<view class="mx-20">

			<u-gap></u-gap>
			<!--  -->
			<uni-forms class="mx-20" :modelValue="form" disabled="true" label-position="top" label-width="90">
				<uni-forms-item label="设备类型" name="deviceType">
					<uni-data-checkbox disabled v-model="form.deviceType" :localdata="sexs" />
				</uni-forms-item>

				<uni-forms-item label="设备名称" name="name">
					<uni-easyinput v-model="form.name" disabled :styles="styles" placeholder="请输入内容"></uni-easyinput>
				</uni-forms-item>

				<uni-forms-item label="设备内容" name="content">
					<uni-easyinput v-model="form.content" disabled :styles="styles" placeholder="请输入内容"></uni-easyinput>
				</uni-forms-item>

				<uni-forms-item label="设备码" name="deviceCode">
					<uni-easyinput v-model="form.deviceCode" disabled :styles="styles"
						placeholder="请输入内容"></uni-easyinput>
				</uni-forms-item>

				<uni-forms-item label="设备地址" name="address">
					<uni-easyinput @iconClick="iconClick" disabled v-model="form.address" :styles="styles"
						placeholder="请输入内容" suffixIcon="location-filled"></uni-easyinput>
				</uni-forms-item>

				<u-gap bgColor="#fff" height="10"></u-gap>
				<u-gap bgColor="#fff" height="10"></u-gap>

				<uni-forms-item label="累计能耗" name="accumulatedEnergyConsumption">
					<uni-easyinput disabled v-model="form.accumulatedEnergyConsumption" :styles="styles"
						placeholder="请输入内容"></uni-easyinput>
				</uni-forms-item>

				<uni-forms-item label="自动清洗周期时间" name="automaticCleaningCycleTime">
					<uni-easyinput disabled v-model="form.automaticCleaningCycleTime" :styles="styles"
						placeholder="请输入内容"></uni-easyinput>
				</uni-forms-item>

<!-- 				<uni-forms-item label="循环泵状态" name="circulationPumpStatus">
					<uni-data-checkbox disabled v-model="form.circulationPumpStatus" :localdata="status" />
				</uni-forms-item> -->

<!-- 				<uni-forms-item label="当前清洗序号" name="currentCleaningSequenceNumber">
					<uni-easyinput disabled v-model="form.currentCleaningSequenceNumber" :styles="styles"
						placeholder="请输入内容"></uni-easyinput>
				</uni-forms-item> -->

<!-- 				<uni-forms-item label="当前电流" name="currentCurrent">
					<uni-easyinput disabled v-model="form.currentCurrent" :styles="styles"
						placeholder="请输入内容"></uni-easyinput>
				</uni-forms-item> -->

<!-- 				<uni-forms-item label="超声清洗时间" name="ltrasonicCleanTime">
					<uni-easyinput disabled v-model="form.ltrasonicCleanTime" :styles="styles"
						placeholder="请输入内容"></uni-easyinput>
				</uni-forms-item> -->

<!-- 				<uni-forms-item label="超声滴水时间" name="ltrasonicDripTime">
					<uni-easyinput disabled v-model="form.ltrasonicDripTime" :styles="styles"
						placeholder="请输入内容"></uni-easyinput>
				</uni-forms-item> -->

<!-- 				<uni-forms-item label="超声波状态" name="ltrasonicStatus">
					<uni-data-checkbox disabled v-model="form.ltrasonicStatus" :localdata="status" />
				</uni-forms-item> -->

<!-- 				<uni-forms-item label="超声排水状态" name="ltrasonicDrainageStatus">
					<uni-data-checkbox disabled v-model="form.ltrasonicDrainageStatus" :localdata="status" />
				</uni-forms-item> -->
				
				
				<!-- deviceType 2 才会有桶子消息 -->
				<view class="" v-if="form.deviceType == '2'">
					<uni-forms-item label="1号景观桶" name="">
						<uni-data-checkbox disabled v-model="form.bucketFullOne" :localdata="tongStatus" />
					</uni-forms-item>
					
					<uni-forms-item label="2号景观桶" name="">
						<uni-data-checkbox disabled v-model="form.bucketFullTwo" :localdata="tongStatus" />
					</uni-forms-item>
					
					<uni-forms-item label="3号景观桶" name="">
						<uni-data-checkbox disabled v-model="form.bucketFullThree" :localdata="tongStatus" />
					</uni-forms-item>
					
					<uni-forms-item label="4号景观桶" name="">
						<uni-data-checkbox disabled v-model="form.bucketFullFour" :localdata="tongStatus" />
					</uni-forms-item>
					
					
					
					
					<uni-forms-item label="油泵过载" name="">
						<uni-data-checkbox disabled v-model="form.oilPumpOverload" :localdata="youStatus" />
					</uni-forms-item>
					
					<uni-forms-item label="喷雾过载" name="">
						<uni-data-checkbox disabled v-model="form.sprayOverload" :localdata="youStatus" />
					</uni-forms-item>
					
					<uni-forms-item label="起火危险" name="">
						<uni-data-checkbox disabled v-model="form.fireHazard" :localdata="youStatus" />
					</uni-forms-item>
				</view>
				
				
				
<!-- 				<view class="" v-if="false">
					<uni-forms-item label="超声进水状态" name="ltrasonicWaterStatus">
						<uni-data-checkbox disabled v-model="form.ltrasonicWaterStatus" :localdata="status" />
					</uni-forms-item>
					<uni-forms-item label="耗水量" name="waterConsumption">
						<uni-easyinput disabled v-model="form.waterConsumption" :styles="styles"
							placeholder="请输入内容"></uni-easyinput>
					</uni-forms-item>
					
					<uni-forms-item label="水箱排水状态" name="waterTankDrainageStatus">
						<uni-data-checkbox disabled v-model="form.waterTankDrainageStatus" :localdata="status" />
					</uni-forms-item>
					<uni-forms-item label="水箱进水状态" name="waterTankInletStatus">
						<uni-data-checkbox disabled v-model="form.waterTankInletStatus" :localdata="status" />
					</uni-forms-item>
				</view> -->
				

<!-- 				<uni-forms-item label="水箱液位状态" name="waterTankLevelhStatus">
					<uni-data-checkbox disabled v-model="form.waterTankLevelhStatus" :localdata="status" />
				</uni-forms-item> -->

<!-- 				<uni-forms-item label="水箱液位状态" name="waterTankLevellStatus">
					<uni-data-checkbox disabled v-model="form.waterTankLevellStatus" :localdata="status" />
				</uni-forms-item> -->
				
			</uni-forms>



			<!-- <u-gap bgColor="#f3f3f3" height="10"></u-gap> -->
			<!--  -->
			
<!-- 			<view class="" v-if="false">
				<u-cell-group>
					<u-cell title="超声波状态" :isLink="true"></u-cell>
					<u-cell title="超声波清洗时间" :isLink="true"></u-cell>
					<u-cell title="超声波滴水时间" :isLink="true"></u-cell>
					<u-cell title="超声波进水状态" :isLink="true"></u-cell>
					<u-cell title="超声波排水状态" :isLink="true"></u-cell>
					<u-cell title="水箱进水状态" :isLink="true"></u-cell>
					<u-cell title="水箱排水状态" :isLink="true"></u-cell>
					<u-cell title="循环泵状态" :isLink="true"></u-cell>
					<u-cell title="水箱液位状态" :isLink="true"></u-cell>
					<u-cell title="自动清洗周期时间" :isLink="true"></u-cell>
					<u-cell title="设备编码" :isLink="true"></u-cell>
				</u-cell-group>
			</view> -->
			
			
		</view>
	</view>
</template>

<script>
	import {
		add
	} from '@/api/device/device.js'
	export default {
		data() {
			return {
				form: {
					// "deviceId": 1,
					"deviceType": "",
					"latitude": 0,
					"longitude": 0,
					"address": "",
					"content": "",
					"name": "",
					"deviceCode": "",

					"accumulatedEnergyConsumption": "",
					"automaticCleaningCycleTime": "",
					"circulationPumpStatus": "",
					"currentCleaningSequenceNumber": "",
					"currentCurrent": "",
					"ltrasonicCleanTime": "",
					"ltrasonicDrainageStatus": "",
					"ltrasonicDripTime": "",
					"ltrasonicStatus": "",
					"ltrasonicWaterStatus": "1",
					"waterConsumption": "37",
					"waterTankDrainageStatus": "1",
					"waterTankInletStatus": "1",
					"waterTankLevelhStatus": "1",
					"waterTankLevellStatus": "1"
				},
				// 单选数据源
				sexs: [{
					text: '主设备',
					value: "1"
				}, {
					text: '景观桶',
					value: "2"
				}],
				/*  */
				status: [
					{
						text: '开启',
						value: "1"
					},
					{
						text: '关闭',
						value: "0"
					},
				],
				/* 桶状态 */
				tongStatus:[
					{
						text: '正常',
						value: "1"
					},
					{
						text: '满桶',
						value: "0"
					},
				],
				/* 油状态 */
				youStatus:[
					{
						text: '正常',
						value: "1"
					},
					{
						text: '报警',
						value: "0"
					},
				],
				
				
				value: null,
				styles: {
					color: '',
					backgroundColor: "#f3f3f3"
				}
			};
		},
		methods: {

		},
		onLoad(options) {
			if (options.data) {
				let val = JSON.parse(decodeURIComponent(options.data))
				console.log(val, "val");
				this.form = val
			}
		},
	}
</script>

<style lang="scss" scoped>
	.index {}
</style>
<style>
	page {
		/* background-color: ; */
	}
</style>